﻿@{
    Layout = null;
    ViewData["Title"] = "DengJiFuHe";
}
<script src="~/js/vue.js"></script>
<script src="~/js/axios.js"></script>
<script src="~/element-ui/lib/index.js"></script>
<link rel="stylesheet" href="~/element-ui/lib/theme-chalk/index.css" />
<div id="app">
    <template>
        <font color="black">
            您正在做的业务是：人力资源--人力资源档案管理--人力资源档案登记复核<br />
            当前等待复核的人力资源档案总数:{{rows}}列
        </font>
        <el-table :data="tableData"
                  style="width: 100%">
            <el-table-column prop="human_id"
                             label="档案编号"
                             width="180">
            </el-table-column>
            <el-table-column prop="human_name"
                             label="姓名"
                             width="180">
            </el-table-column>
            <el-table-column prop="human_sex"
                             label="性别"
                             width="180">
            </el-table-column>
            <el-table-column prop="first_kind_name"
                             label="I级机构"
                             width="180">
            </el-table-column>
            <el-table-column prop="second_kind_name"
                             label="II级机构"
                             width="180">
            </el-table-column>
            <el-table-column prop="third_kind_name"
                             label="III级机构"
                             width="180">
            </el-table-column>
            <el-table-column prop="human_pro_designation"
                             label="职称"
                             width="180">
            </el-table-column>
            <el-table-column label="复核" width="145">
                <template slot-scope="scope">
                    <el-button size="mini"
                               type="danger"
                               v-on:click="FuHe(scope.row)">复核</el-button>
                </template>
            </el-table-column>
        </el-table>
    </template>
    <!--分页按钮-->
    <el-pagination v-on:size-change="handleSizeChange"
                   v-on:current-change="handleCurrentChange"
                   :current-page="currentPage"
                   :page-sizes="[2,4,6,8]"
                   :page-size="size"
                   layout="total, sizes, prev, pager, next, jumper"
                   :total="rows">
    </el-pagination>
</div>

<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            tableData: [],
            currentPage: 1,
            //每页显示的行数
            rows: 1,
            //每页多少条数据
            size: 2,
        },
        methods: {
            Find() {
                axios.get("/RenLiZiYuanDangAnGuanLi/FenYe", { params: { size: this.size, currentPage: this.currentPage } }).then(res => {
                    //console.info(res.data);
                    this.tableData = res.data.renLi;
                    this.rows = res.data.rows;
                    console.info(res.data);
                })
            },
            //点击复核
            FuHe(row) {
                console.info("Row:", row);
                //window.parent.Myiframe.location.href = "/RenLiZiYuanDangAnGuanLi/UpdateDengJiFuHe?id=" + row.huf_id;
                location.href = "/RenLiZiYuanDangAnGuanLi/UpdateDengJiFuHe?id=" + row.huf_id;
            },
            //页码大小改变方法
            handleSizeChange(size) {
                this.size = size;
                this.Find();
            },
            //当前页改变查询
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.Find();
            },
        },
        mounted() {
            this.Find();
        }
    })
</script>

